<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        body {
            background: #fff;
        }
        
        table {
            border-collapse: collapse;
            margin: 0 auto;
            width: 750px;
            text-align: center;
        }
        
        a {
            text-decoration: none;
            color: #090;
        }
        
        a:hover {
            color: #F00;
        }
    </style>
</head>

<body>
    <a href="http://www.tp.com:8080/home/goods/add">添加</a>
    <table cellspacing='0' cellpadding='0' border="1">
        <tr>
            <th>id</th>
            <th>姓名</th>
            <th>年龄</th>
            <th>价格</th>
            <th colspan="2">操作</th>
        </tr>
        <!-- {//forEach($data as $v)}
        <tr>
            <td>{//$v.id}</td>
            <td>{//$v.name}</td>
            <td>{//$v.age}</td>
        </tr>

        {///forEach} -->
        {volist name='data' id='v'}
        <tr>
            <td>{$v.proID}</td>
            <td>{$v.proname}</td>
            <td>{$v.proguige}</td>
            <td>{$v.proprice}</td>
            <td><a href="http://www.tp.com:8080/home/goods/edit?proID={$v.proID}">修改</a></td>
            <td><a href="http://www.tp.com:8080/home/goods/del?proID={$v.proID}">删除</a></td>
        </tr>
        {/volist}
        <!-- {//volist name='data' id='v' offset='0' length='1'}
        <tr>
            <td>{//$v.id}</td>
            <td>{//$v.name}</td>
            <td>{//$v.age}</td>
        </tr>
        {///volist} -->
    </table>
    <script>
        // function edit(id) {
        //     var xhr = new XMLHttpRequest();
        //     xhr.open('get', 'http://www.tp.com:8080/home/goods/edit?proID=' + id)
        //     xhr.send();
        //     console.log(id);

        // }
    </script>
</body>

</html>